c program for finding maximum and minimum element of an array